3.301 \(\int \frac {\cos (c+d x) \cot (c+d x)}{a+a \sin (c+d x)} \, dx\)

Optimal. Leaf size=22 \[ -\frac {\tanh ^{-1}(\cos (c+d x))}{a d}-\frac {x}{a} \]

[Out]

-x/a-arctanh(cos(d*x+c))/a/d

________________________________________________________________________________________

Rubi [A]  time = 0.07, antiderivative size = 22, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {2839, 3770, 8} \[ -\frac {\tanh ^{-1}(\cos (c+d x))}{a d}-\frac {x}{a} \]

Antiderivative was successfully verified.

[In]

Int[(Cos[c + d*x]*Cot[c + d*x])/(a + a*Sin[c + d*x]),x]

[Out]

-(x/a) - ArcTanh[Cos[c + d*x]]/(a*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2839

Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.))/((a_) + (b_.)*sin[(e_.) + (f_
.)*(x_)]), x_Symbol] :> Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Dist[g^2/(b*d),
Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2
 - b^2, 0]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {\cos (c+d x) \cot (c+d x)}{a+a \sin (c+d x)} \, dx &=-\frac {\int 1 \, dx}{a}+\frac {\int \csc (c+d x) \, dx}{a}\\ &=-\frac {x}{a}-\frac {\tanh ^{-1}(\cos (c+d x))}{a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 37, normalized size = 1.68 \[ -\frac {-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+c+d x}{a d} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[c + d*x]*Cot[c + d*x])/(a + a*Sin[c + d*x]),x]

[Out]

-((c + d*x + Log[Cos[(c + d*x)/2]] - Log[Sin[(c + d*x)/2]])/(a*d))

________________________________________________________________________________________

fricas [A]  time = 0.49, size = 37, normalized size = 1.68 \[ -\frac {2 \, d x + \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{2 \, a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*csc(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

-1/2*(2*d*x + log(1/2*cos(d*x + c) + 1/2) - log(-1/2*cos(d*x + c) + 1/2))/(a*d)

________________________________________________________________________________________

giac [A]  time = 0.15, size = 31, normalized size = 1.41 \[ -\frac {\frac {d x + c}{a} - \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*csc(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

-((d*x + c)/a - log(abs(tan(1/2*d*x + 1/2*c)))/a)/d

________________________________________________________________________________________

maple [A]  time = 0.38, size = 37, normalized size = 1.68 \[ -\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^2*csc(d*x+c)/(a+a*sin(d*x+c)),x)

[Out]

-2/a/d*arctan(tan(1/2*d*x+1/2*c))+1/a/d*ln(tan(1/2*d*x+1/2*c))

________________________________________________________________________________________

maxima [B]  time = 0.43, size = 52, normalized size = 2.36 \[ -\frac {\frac {2 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a}}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*csc(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

-(2*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a - log(sin(d*x + c)/(cos(d*x + c) + 1))/a)/d

________________________________________________________________________________________

mupad [B]  time = 8.77, size = 79, normalized size = 3.59 \[ \frac {2\,\mathrm {atan}\left (\frac {\sqrt {2}\,\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,\cos \left (\frac {c}{2}-\frac {\pi }{4}+\frac {d\,x}{2}\right )}\right )}{a\,d}+\frac {\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{a\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^2/(sin(c + d*x)*(a + a*sin(c + d*x))),x)

[Out]

(2*atan((2^(1/2)*(cos(c/2 + (d*x)/2) - sin(c/2 + (d*x)/2)))/(2*cos(c/2 - pi/4 + (d*x)/2))))/(a*d) + log(sin(c/
2 + (d*x)/2)/cos(c/2 + (d*x)/2))/(a*d)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {\cos ^{2}{\left (c + d x \right )} \csc {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**2*csc(d*x+c)/(a+a*sin(d*x+c)),x)

[Out]

Integral(cos(c + d*x)**2*csc(c + d*x)/(sin(c + d*x) + 1), x)/a

________________________________________________________________________________________